"use strict";

(function () {
  function r(e, n, t) {
    function o(i, f) {
      if (!n[i]) {
        if (!e[i]) {
          var c = "function" == typeof require && require;
          if (!f && c) return c(i, !0);
          if (u) return u(i, !0);
          var a = new Error("Cannot find module '" + i + "'");
          throw a.code = "MODULE_NOT_FOUND", a;
        }

        var p = n[i] = {
          exports: {}
        };
        e[i][0].call(p.exports, function (r) {
          var n = e[i][1][r];
          return o(n || r);
        }, p, p.exports, r, e, n, t);
      }

      return n[i].exports;
    }

    for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) {
      o(t[i]);
    }

    return o;
  }

  return r;
})()({
  1: [function (require, module, exports) {
    "use strict";

    loader.define(function (require, exports, module, global) {
      var pageview = {}; // http://121.89.201.29:5000/
      // pageview.apiurl = "http://121.89.201.29:5000/";
      //pageview.apiurl = "https://121.89.201.29:5000/";

      pageview.apiurl = "";
      var storage = bui.storage();
      pageview.bs = {
        islogin: function islogin() {
          if (storage.get("islogin", 0) == true) return true;
          return false;
        },
        getuser: function getuser() {
          var data = {
            mobile: storage.get("user", 0),
            password: storage.get("password", 0)
          };
          return data;
        },
        saveuser: function saveuser(user, password) {
          storage.remove("user");
          storage.remove("password");
          storage.set("user", user);
          storage.set("password", password);
        },
        clearuser: function clearuser() {
          storage.clear();
        },
        login: function login() {
          storage.remove("islogin");
          storage.set("islogin", true);
        },
        logout: function logout() {
          storage.remove("islogin");
          storage.set("islogin", false);
        },
        save: function save() {
          storage.remove("issave");
          storage.set("issave", true);
        },
        unsave: function unsave() {
          storage.remove("issave");
          storage.set("issave", false);
        },
        issave: function issave() {
          if (storage.get("issave", 0) == true) return true;
          return false;
        }
      }; // pageview.bs = bui.store({
      //     scope: "config",
      //     data: {
      //         form: {
      //             "user": "",
      //             "password": ""
      //         }
      //     },
      //     methods: {
      //         islogin: function(){
      //             var userinfo = storage.get("userinfo", 0);
      //             var user = userinfo.user;
      //             if(user != "")
      //                 return true;
      //             return false;
      //         },
      //         getCacheUser: function () {
      //             return storage.get("userinfo", 0);
      //         },
      //         saveCacheUser: function(user, password){
      //             this.$data.form.user = user;
      //             this.$data.form.password = password;
      //             storage.set("userinfo", this.$data.form)
      //         },
      //         clearCacheUser: function(){
      //             this.$data.form.user = "";
      //             this.$data.form.password = "";
      //             storage.clear();
      //         }
      //     }
      // });

      return pageview;
    });
  }, {}]
}, {}, [1]);